package com.gz.im.backend.pojo;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author GuoZhong
 * @description 消息实体
 * @date 2023/3/26 22:28
 */
@Data
public class MessageRequest implements Serializable {
	private static final long serialVersionUID = -5857778349790530754L;
	/**
	 * 发送人
	 */
	private Long senderId;
	/**
	 * 接收人
	 */
	private Long receiverId;

	/**
	 * 消息类型
	 */
	private Integer chatType;
	/**
	 * 消息体
	 */
	private String content;

	/**
	 * 创建的时间
	 */
	@JsonDeserialize(using = LocalDateTimeDeserializer.class)
	@JsonSerialize(using = LocalDateTimeSerializer.class)
	private LocalDateTime time;
}